#include <ros/ros.h>
#include <ros_test_pkg/myMsg.h>

void num_callback(const ros_test_pkg::myMsg::ConstPtr& msg)
{
    ROS_INFO("Msg.name:[%s],Msg.device_id:[%d],Msg.percent:[%f]",
    msg->name.c_str(),msg->device_id,msg->percent);

}

int main(int argc,char **argv)
{
    ros::init(argc,argv,"topic_subscriber");
    ros::NodeHandle node_handle;

    ros::Subscriber number_subscriber = node_handle.subscribe("/count",10,num_callback);

    ros::spin();
    return 0;
}